import java.util.Scanner;
public class HelloWorldMenu
{
	public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in);
		
		System.out.println("Welcome to the menu!");
		String userSelection = "";
		
		while(!userSelection.equals("q"))
		{
			System.out.println("------------------------");
			System.out.println("Please make a selection.");
			System.out.println("(a)dd");
			System.out.println("(s)ubtract");
			System.out.println("(m)ultiply");
			System.out.println("(d)ivide");
			System.out.println("(q)uit");
			
			System.out.print("Selection: ");
			userSelection = input.next();//get user's selection
			
			switch(userSelection)
			{
				case "a":
					System.out.println("You selected add!");
					
					System.out.print("Please enter first number: ");
					String numStr1 = input.next();
					int num1 = Integer.parseInt(numStr1);
					
					System.out.print("Please enter second number: ");
					String numStr2 = input.next();
					int num2 = Integer.parseInt(numStr2);
					
					System.out.println(num1 + " + " + num2 + " = " + (num1+num2) );
					
					break;
				case "s":
					System.out.println("You selected subtract!");
					break;
				case "m":
					System.out.println("You selected multiply!");
					break;
				case "d":
					System.out.println("You selected divide!");
					break;
				case "q":
					System.out.println("You selected quit!");
					break;
			}
		}
	}
}
